﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

//using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;
using Microsoft.Practices.EnterpriseLibrary.Common;
namespace Enterprise.Infrastructure
{
    /// <summary>
    /// 加解密操作方法
    /// </summary>
   public class CryptographerHelper
    {
       /// <summary>
       /// 企业库Md5加密 不可逆
       /// </summary>
       /// <param name="plaintext">待加密</param>
       /// <returns></returns>
       public string Md5(string plaintext)
       {
           return "";//Cryptographer.CreateHash("MD5Cng", plaintext);
       }

       /// <summary>
       /// 企业库对称加密方法 可逆
       /// </summary>
       /// <param name="plaintext">待加密</param>
       /// <returns></returns>
       public string Encrypt(string plaintext)
       {
           return "";//Cryptographer.EncryptSymmetric("DPAPI Symmetric Crypto Provider", plaintext);
       }

       /// <summary>
       /// 企业库对称解密方法 可逆
       /// </summary>
       /// <param name="plaintext">待加密</param>
       /// <returns></returns>
       public string Decrypt(string plaintext)
       {
           return "";//Cryptographer.DecryptSymmetric("DPAPI Symmetric Crypto Provider", plaintext);
       }
       
    }
}
